package com.loan.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.loan.entity.Perm;
import com.loan.mappers.PermMapper;
import com.loan.service.PermService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * YJS
 */
@Service
public class PermServiceImpl extends ServiceImpl<PermMapper, Perm> implements PermService {

    @Autowired
    private PermMapper permMapper;

    @Override
    public List<Perm> listByEmpId(int empid) {
        return permMapper.getByEmpId(empid);
    }

    @Override
    public List<Perm> getMenuByEmpId(int empid) {
        return permMapper.getmenuByEmpId(empid);
    }

    @Override
    public List<Perm> getAllMenu() {
        return permMapper.getallmenu();
    }

    @Override
    public void deletePerm(int permid) {
        permMapper.deletePerm(permid);
    }

    @Override
    public Perm getPerm(int permid) {
        Perm perm = permMapper.getPerm(permid);
        return perm;
    }

    @Override
    public List<Perm> selectByPerm(Perm perm) {
        return permMapper.selectPerm(perm);
    }
}
